package com.sheep.pattern;

import java.util.Date;
import java.util.Random;
import java.util.function.Supplier;

/**
 * @author wangze
 * @date 2021-01-14 15:09.
 **/
public class SupplierTest {
	public static void main(String[] args) {
		Supplier<Integer> s = () -> {
			Random r=new Random();
			System.out.println(r.toString());
			return r.nextInt();
		};

		System.out.println(s.get());
		System.out.println(s.get());
		System.out.println(s.get());
	}
}
